Using AI Features in Reverse and Forward Engineering
erwin DM offers AI-powered data modeling that enhances reverse engineering and forward engineering. You can use AI to validate DDL scripts, generate models, and perform script checks, which reduces manual effort and improves accuracy. You can also review the AI Terms of Use and provide feedback to improve future results.
You can use AI features in multiple ways:
-
AI Generate: Generate scripts automatically based on the descriptions you provide.
-
AI Validate: Validate scripts with AI assistance to identify errors and receive suggestions for improvement.
-
AI Prompt Input: Customize script generation by entering natural language prompts to guide the AI.
-
AI Terms of Use: View the terms and conditions for using AI-powered features in erwin DM.
-
Provide Feedback: Share feedback on AI-generated scripts to help improve future results.
Prerequisites
Ensure that the following prerequisites are in place:
-
Access to erwin Mart Portal
-
AI Credentials: AI License Key, Client Id, and Client Secret
Workflow
The AI workflow for Reverse and Forward Engineering includes the following steps:
Enabling AI Using erwin Mart Portal Licensing
To use AI features, you need to configure a license using AI credentials through erwin Mart Portal and ensure that erwin DM is connected to the erwin Mart Portal.
To enable AI features, follow these steps:
-
Go to Application Menu > Settings > General.
The General page appears.
-
Scroll to the DM AI Credentials field.
-
Enter your AI License Key, Client Id, and Client Secret in the appropriate fields.
-
Click Save.
Your AI credentials are saved, and AI features are enabled in erwin DM.
Using AI Options in Reverse Engineering
You can generate and validate scripts during the Reverse Engineering process with the help of AI options. This topic walks you through using AI options for MongoDB in RE as an example. Similarly, you can use these steps for other databases. This process involves the following steps:

To generate script, follow these steps:
-
In erwin Data Modeler (DM), click Actions > Reverse Engineer.
The New Model screen appears.
-
Click Logical/Physical and select a Database.
-
Click Next.
The Reverse Engineering Wizard appears.
-
Select the Enable AI Prompt Input checkbox. Clicking this option enables the prompt text box where you can describe your model to AI. For example, Create a script for healthcare schema.
-
Click AI Generate.
The dialog box appears and displays the AI-generated script based on your description, which you can review, edit, save, and reuse.
You can also use the following options:
-
Search (
): Use this option to search for a word or characters in the schema.
-
Save (
): Use this option to save the generated script.
-
Copy (
): Use this option to copy the script.
-
Replace (
): Use this option to find and replace characters in the script.
-
Text Options (
): Use this option to configure the preview text editor's look and feel, such as window, font, and syntax color settings.
-
AI Terms of Use: Use this option to view the terms and conditions for AI-powered features in erwin DM.
-
Was this helpful?: Use this option to provide feedback on the AI-generated script. Click
or
to submit positive or negative feedback. A feedback pop-up opens where you can enter your comments and click Submit.
-

To validate script, follow these steps:
-
In erwin Data Modeler (DM), click Actions > Reverse Engineer.
The New Model screen appears.
-
Click Logical/Physical and select a Database.
-
Click Next.
The Reverse Engineering Wizard appears.
-
Click Script File. Clicking this option enables the File field. Click Browse and select the a script file from your directory.
-
Click AI Validate to validate the script file.
The dialog box appears in the following scenarios:
-
Scenario 1: Script is correct
When you upload a syntactically correct MongoDB script, the dialog box displays a confirmation message such as "The script you posted for MongoDB is syntactically correct."
-
Scenario 2: Script contain errors
When your script has syntax errors, the dialog box displays the error details along with suggestions to help you fix them.
AI has certain token limitations. If your script or prompt is too long, it may be truncated or fail to generate/validate. During validation, syntax or keyword mismatches may also occur due to differences in database versions supported by AI. In such cases, you must manually correct the script before running it.
You can also use the following options:
-
Search (
): Use this option to search for a word or characters in the schema.
-
Save (
): Use this option to save the generated script.
-
Copy (
): Use this option to copy the script.
-
Replace (
): Use this option to find and replace characters in the script.
-
Text Options (
): Use this option to configure the preview text editor's look and feel, such as window, font, and syntax color settings.
-
AI Terms of Use: Use this option to open the terms and conditions for AI-powered features in erwin DM.
-
Was this helpful?: Use this option to provide feedback on the AI-generated script. Click
or
to submit positive or negative feedback. A feedback pop-up opens where you can enter your comments and click Submit.
-
Using AI Options in Forward Engineering
You can validate scripts during the forward Engineering process with the help of AI option. This topic walks you through using AI Validate for MongoDB in FE as an example. Similarly, you can use these steps for other databases. This process involves the following steps:

-
Open a MongoDB model in erwin Data Modeler.
Ensure that you are in the Physical mode.
-
Click Actions > Schema.
The Forward Engineer Schema Generation Wizard appears.
-
Click Preview to view the schema script.
-
Click AI Validate to validate the script file.
The message dialog box appears in the following scenarios:
-
Scenario 1: Script is correct
When you upload a syntactically correct MongoDB script, the dialog box displays a confirmation message, "The script you posted for MongoDB is syntactically correct."
-
Scenario 2: Script contains errors
When your script has syntax errors, the dialog box displays the error details along with suggestions to help you fix them.
AI has certain token limitations. If your script or prompt is too long, it may be truncated or fail to generate/validate. During validation, syntax or keyword mismatches may also occur due to differences in database versions supported by AI. In such cases, you must manually correct the script before running it.
You can also use the following options:
-
Search (
): Use this option to search for a word or characters in the schema.
-
Save (
): Use this option to save the generated script.
-
Copy (
): Use this option to copy the script.
-
Replace (
): Use this option to find and replace characters in the script.
-
Text Options (
): Use this option to configure the preview text editor's look and feel, such as window, font, and syntax color settings.
-
AI Terms of Use: Use this option to open the terms and conditions for AI-powered features in erwin DM.
-
Was this helpful?: Use this option to provide feedback on AI-generated script. Click
or
to submit positive or negative feedback. A feedback popup opens where you can enter your comments and click Submit.
-
Copyright © 2025 Quest Software, Inc. |